Range

Function

This API is used to get the parameter range of Event Settings(cloud dedicated) > Settings.

Note:

The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

Request Message

Table 1

ParameterRangeTypeDescription
channel"CH1"...stringCorresponding intelligent channel
abilities"FaceDetection",
"HumanVehicle",
"LicensePlate",
"LineCrossing",
"Intrusion",
"Intrusion",
"ExitRegion",
"ObjectDetection",
"CrossCounting",
"CrossCounting",
"QueueLength",
"CrowdDensity",
"RareSound",
"MotionDetection",
"VideoTampering",
"HumanDetection",
"ParcelDetection",
"WanderDetection"
arrayCurrent intelligence
oper_type"get_default_data"stringWhether to get the default value for smart

Sampel:

POST /API/Event/SettingConfig/Range HTTP/1.1
{
    "version": "1.0",
    "data": {
        "channel": "CH1",
        "ability": "FaceDetection",
        "oper_type": "get_default_data"
    }
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
channel_infoJSON objectThe channel information is displayed in JSON,see Table 3 for more information

|page_type|“ChannelConfig”
“AlarmConfig”|string|Data used to distinguish between the channel configuration page and the alarm configuration page | |channel_max| |int|Maximum number of channels | |agreed_to_agreement| |bool|Whether to agree with the face protocol. | |statement_file_name| |string|The displayed face protocol file name. |

Table 3

ParameterRangeTypeDescription
CH1Json ObjectJSON,see Table 4 for more information
Json Object
IP_CH1Json Object
Json Object
WIFI_CH1Json Object
Json Object

Table 4

Channel Object

ParameterRangeTypeDescription
btn_get_default_databoolGet default parameters button
draw_add_btnboolAdd Rule box button
trigger_mode"Rect"
"Line"
stringRule type
...See [AI > Setup](./.. /.. /AI/Setup/) to obtain parameter description.

Tips:

The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "default_timeout": 30000,
        "channel_info": {
            "type": "object",
            "items": {"CH1": {
                "type": "object",
                "items": {
                    "switch": {"type": "bool"},
                    "iva_lines": {"type": "bool"},
                    "face_attribute": {"type": "bool"},
                    "face_enhance": {"type": "bool"},
                    "sensitivity": {
                        "type": "int32",
                        "mode": "r",
                        "min": 0,
                        "max": 100,
                        "default_value": 60
                    },
                    "face_angle": {
                        "type": "string",
                        "items": [
                            "FrontalView",
                            "Multiangle",
                            "UserDefined"
                        ]
                    },
                    "snap_mode": {
                        "type": "string",
                        "items": [
                            "OptimalMode",
                            "RealTimeMode",
                            "IntervalMode"
                        ]
                    },
                    "snap_num": {
                        "type": "string",
                        "items": [
                            "1",
                            "2",
                            "3",
                            "Unlimited"
                        ]
                    },
                    "snap_frequency": {
                        "type": "int32",
                        "min": 1,
                        "max": 255
                    },
                    "min_pixel": {
                        "type": "int32",
                        "mode": "r",
                        "min": 32,
                        "max": 1080,
                        "default_value": 64
                    },
                    "max_pixel": {
                        "type": "int32",
                        "mode": "r",
                        "min": 320,
                        "max": 1080,
                        "default_value": 640
                    },
                    "detection_mode": {
                        "type": "string",
                        "items": [
                            "HybridMode",
                            "MotionMode"
                        ]
                    },
                    "roll_range": {
                        "type": "int32",
                        "mode": "r",
                        "min": 0,
                        "max": 180,
                        "default_value": 30,
                        "default_value_frontal": 30,
                        "default_value_multi": 180
                    },
                    "pitch_range": {
                        "type": "int32",
                        "mode": "r",
                        "min": 0,
                        "max": 180,
                        "default_value": 30,
                        "default_value_frontal": 30,
                        "default_value_multi": 180
                    },
                    "yaw_range": {
                        "type": "int32",
                        "mode": "r",
                        "min": 0,
                        "max": 180,
                        "default_value": 45,
                        "default_value_frontal": 45,
                        "default_value_multi": 180
                    },
                    "picture_quality": {
                        "type": "int32",
                        "mode": "r",
                        "min": 0,
                        "max": 100,
                        "default_value": 100,
                        "default_value_frontal": 100,
                        "default_value_multi": 100
                    },
                    "draw_add_btn": {@
                        "type": "object",
                        "items": {"visible": {"type": "bool"}}
                    },
                    "rule_info": {
                        "type": "object",
                        "items": {
                            "rule_number1": {
                                "type": "object",
                                "items": {
                                    "rule_switch": {"type": "bool"},
                                    "point_num": {
                                        "type": "array",
                                        "size": 2,
                                        "items": []
                                    },
                                    "detection_range": {
                                        "type": "string",
                                        "items": [
                                            "FullScreen",
                                            "UserDefined"
                                        ]
                                    },
                                    "rule_rect": {
                                        "type": "object",
                                        "items": {
                                            "x1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x3": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x4": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x5": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x6": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x7": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x8": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "y1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y3": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y4": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y5": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y6": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y7": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y8": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            }
                                        }
                                    },
                                    "rule_line": {
                                        "type": "object",
                                        "items": {
                                            "x1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "y1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "x2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "y2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            }
                                        }
                                    },
                                    "rule_type": {
                                        "description": "Only rule_line has this variable.",
                                        "type": "string",
                                        "mode": "r",
                                        "items": [
                                            "A->B",
                                            "B->A"
                                        ]
                                    },
                                    "trigger_mode": {@
                                        "type": "string",
                                        "items": [
                                            "Rect",
                                            "Line"
                                        ]
                                    }
                                }
                            },
                            "rule_number2": {
                                "type": "object",
                                "items": {
                                    "rule_switch": {"type": "bool"},
                                    "point_num": {
                                        "type": "array",
                                        "size": 2,
                                        "items": []
                                    },
                                    "detection_range": {
                                        "type": "string",
                                        "items": [
                                            "FullScreen",
                                            "UserDefined"
                                        ]
                                    },
                                    "rule_rect": {
                                        "type": "object",
                                        "items": {
                                            "x1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x3": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x4": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x5": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x6": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x7": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x8": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "y1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y3": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y4": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y5": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y6": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y7": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y8": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            }
                                        }
                                    }
                                }
                            },
                            "rule_number3": {
                                "type": "object",
                                "items": {
                                    "rule_switch": {"type": "bool"},
                                    "point_num": {
                                        "type": "array",
                                        "size": 2,
                                        "items": []
                                    },
                                    "detection_range": {
                                        "type": "string",
                                        "items": [
                                            "FullScreen",
                                            "UserDefined"
                                        ]
                                    },
                                    "rule_rect": {
                                        "type": "object",
                                        "items": {
                                            "x1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x3": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x4": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x5": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x6": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x7": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x8": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "y1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y3": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y4": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y5": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y6": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y7": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y8": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            }
                                        }
                                    }
                                }
                            },
                            "rule_number4": {
                                "type": "object",
                                "items": {
                                    "rule_switch": {"type": "bool"},
                                    "point_num": {
                                        "type": "array",
                                        "size": 2,
                                        "items": []
                                    },
                                    "detection_range": {
                                        "type": "string",
                                        "items": [
                                            "FullScreen",
                                            "UserDefined"
                                        ]
                                    },
                                    "rule_rect": {
                                        "type": "object",
                                        "items": {
                                            "x1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x3": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x4": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x5": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x6": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x7": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "x8": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 704
                                            },
                                            "y1": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y2": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y3": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y4": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y5": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y6": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y7": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            },
                                            "y8": {
                                                "type": "int32",
                                                "min": 0,
                                                "max": 576
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "btn_get_default_data": true@
                }
            }}
        },
        "agreed_to_agreement": {"type": "bool"},
        "statement_file_name": {
            "type": "string",
            "min_len": 1,
            "max_len": 48
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.